#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    vector<int> shortestToChar(string s, char c) {
        vector<int> v1;
        for (int i = 0; i < s.size(); ++i)
        {
            for (int j = 0; j < s.size(); ++j)
            {
                if (i - j >= 0)
                {
                    if (s[i - j] == c)
                    {
                        v1.push_back(j);
                        break;
                    }
                }
                if (i + j < s.size())
                {
                    if (s[i + j] == c)
                    {
                        v1.push_back(j);
                        break;
                    }
                }
            }
        }

        return v1;
    }
};